package com.lishe.lishe.lishe.utils;

import android.annotation.SuppressLint;
import android.os.Parcel;
import android.os.Parcelable;

import java.io.File;
import java.util.ArrayList;
import java.util.List;

//文件的类
@SuppressLint("ParcelCreator")
public class FileObject implements Parcelable {
	public String filename;//所属图片的文件名称
	public String filePath;//所属图片的文件名称
	public List<String> filecontent=new ArrayList<String>();
	public File file;

	@Override
	public int describeContents() {
		return 0;
	}
	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(filename);
		dest.writeString(filePath);
		dest.writeList(filecontent);
	}
	
	public static final Parcelable.Creator<FileObject> CREATOR=new Creator<FileObject>() {
		
		@Override
		public FileObject[] newArray(int size) {
			return null;
		}
		
		@Override
		public FileObject createFromParcel(Parcel source) {
			FileObject ft=new FileObject();
			ft.filename= source.readString();
			ft.filePath= source.readString();
			ft.filecontent= source.readArrayList(FileObject.class.getClassLoader());
			
			return ft;
		}
		
		
	};

	public String getFilename() {
		return filename;
	}
	public String getFilePath() {
		return filePath;
	}

	public void setFilename(String filename) {
		this.filename = filename;
	}
	public void setFilePath(String filePath) {
		this.filePath = filePath;
	}

	public List<String> getFilecontent() {
		return filecontent;
	}

	public File getFile() {
		return file;
	}

	public void setFile(File file) {
		this.file = file;
	}
}
